package com.luoyuanxiangvip.core.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.luoyuanxiangvip.core.entity.support.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 评论
 * </p>
 *
 * @author luoyuanxiang <p>luoyuanxiangvip.com</p>
 * @since 2019-05-30
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value = "BizComment对象", description = "评论")
public class BizComment extends BaseEntity {

    private static final long serialVersionUID = -877935209328215542L;
    @ApiModelProperty(value = "被评论的文章或者页面的ID")
    private Long postId;

    @ApiModelProperty(value = "父级评论的id")
    private Long pid;

    @ApiModelProperty(value = "评论人的昵称")
    private String nickname;

    @ApiModelProperty(value = "评论人的头像地址")
    private String avatar;

    @ApiModelProperty(value = "评论人的邮箱地址")
    private String email;

    @ApiModelProperty(value = "评论人的网站")
    private String site;

    @ApiModelProperty(value = "评论的状态")
    private Boolean status;

    @ApiModelProperty(value = "评论时的ip")
    @TableField("IP")
    private String ip;

    @ApiModelProperty(value = "经度")
    private String lng;

    @ApiModelProperty(value = "纬度")
    private String lat;

    @ApiModelProperty(value = "省份或国家")
    private String province;

    @ApiModelProperty(value = "城市")
    private String city;

    @ApiModelProperty(value = "评论时的系统扩展")
    private String agent;

    @ApiModelProperty(value = "评论的内容")
    private String content;

    @ApiModelProperty(value = "支持（赞）")
    private Integer support;

    /** 父级对象 */
    @TableField(exist = false)
    private BizComment parent;

    /** 文章 */
    @TableField(exist = false)
    private BizArticle article;
}
